{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "9e50a1cf-811c-4e1b-94e4-86355b4def29",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "# from sklearn.model_selection import train_test_split\n",
    "import tensorflow as tf\n",
    "import os\n",
    "import sys\n",
    "import numpy as np\n",
    "from tensorflow.keras.layers import *\n",
    "import tensorflow.keras.backend as K\n",
    "from tqdm import tqdm\n",
    "from feature_utils import *\n",
    "import argparse\n",
    "import datetime\n",
    "from sklearn.metrics import f1_score, auc, precision_score, roc_auc_score, accuracy_score, recall_score\n",
    "\n",
    "pd.set_option('display.max_columns', None)\n",
    "# pd.set_option('display.max_colwidth', None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "93ec1696-8f0a-4a37-a590-44c699f34106",
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_dataset():\n",
    "    dfiles = os.listdir('out/')\n",
    "    absfiles = [\"out/\" + f for f in dfiles]\n",
    "    dfs = []\n",
    "    for af in absfiles:\n",
    "        df = pd.read_csv(af, names = COLUMNS, header = None)\n",
    "        dfs.append(df)\n",
    "    df = pd.concat(dfs)\n",
    "    df['dt'] = pd.to_datetime(df.date)\n",
    "    return df\n",
    "\n",
    "def gen_input(X):\n",
    "    Y = X.loc[:, 'target']\n",
    "    return X.loc[:, FNAMES].values, Y.values\n",
    "\n",
    "def my_loss_fn(y_true, y_pred):\n",
    "    loss = K.binary_crossentropy(y_true, y_pred)\n",
    "    #weight_vector = y_true * 1.3 + (1 - y_true) * 0.3\n",
    "    #wloss = weight_vector * loss\n",
    "    wloss = loss\n",
    "    return K.mean(wloss)\n",
    "\n",
    "def model_fun():\n",
    "    cinput_map = {}\n",
    "    emb_list = []\n",
    "    X = tf.keras.Input(len(FNAMES), name = 'X')\n",
    "    inputs = [X]\n",
    "    dnn_part = Dense(128, activation='relu')(X)\n",
    "    dnn_part = tf.keras.layers.BatchNormalization()(dnn_part)\n",
    "    last = dnn_part\n",
    "    \n",
    "    last = tf.keras.layers.BatchNormalization()(last)\n",
    "    last = tf.keras.layers.Dense(128, activation='relu')(last)\n",
    "    \n",
    "    last = tf.keras.layers.BatchNormalization()(last)\n",
    "    last = tf.keras.layers.Dense(128, activation='relu')(last)\n",
    "    \n",
    "    \n",
    "    last = tf.keras.layers.BatchNormalization()(last)\n",
    "    final = tf.keras.layers.Dense(1, activation='sigmoid')(last)\n",
    "    model = tf.keras.Model(inputs = inputs, outputs = final)\n",
    "\n",
    "    model.compile(\n",
    "        loss='binary_crossentropy',\n",
    "        #loss=my_loss_fn,\n",
    "        optimizer='adam',\n",
    "        metrics=['accuracy', tf.keras.metrics.AUC()]\n",
    "        )\n",
    "    return model\n",
    "\n",
    "\n",
    "def flag_fun(row):\n",
    "    if row['target'] == 1.0 and row['Y'] > 0.7:\n",
    "        return 0\n",
    "    elif row['target'] == 0.0 and row['Y'] < 0.3:\n",
    "        return 1\n",
    "    elif (row['target'] == 0.0 and row['Y'] > 0.7) or (row['target'] == 1.0 and row['Y'] < 0.3):\n",
    "        return 2\n",
    "    else:\n",
    "        return 3\n",
    "\n",
    "\n",
    "\n",
    "# model_dir = \"dmodel\"\n",
    "# if ARGS.job == 'train':\n",
    "#     callbacks = []\n",
    "#     log_dir = \"train_logs/\"\n",
    "#     tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)\n",
    "#     callbacks.append(tensorboard_callback)\n",
    "#     model = model_fun()\n",
    "#     model.fit(X_train, Y_train, epochs = 3, callbacks=callbacks)\n",
    "#     model.save(model_dir)\n",
    "#     model.evaluate(X_test, Y_test)\n",
    "# elif ARGS.job == 'eval':\n",
    "#     model = tf.keras.models.load_model(model_dir)\n",
    "#     model.evaluate(X_test, Y_test)\n",
    "# elif ARGS.job == 'predict':\n",
    "#     model = tf.keras.models.load_model(model_dir)\n",
    "#     Y_res = model.predict(X_test)\n",
    "#     X2.loc[:, \"target\"] = Y_test\n",
    "#     X2.loc[:, \"Y\"] = Y_res\n",
    "#     X2.loc[:, \"FLAG\"] = X2.apply(flag_fun, axis=1)\n",
    "#     for i in range(4):\n",
    "#         X2[X2.FLAG == i].to_csv(\"/tmp/p_%d.csv\" % i, index = False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "d26fd485-2510-4bc3-b017-43d0712b15d1",
   "metadata": {},
   "outputs": [],
   "source": [
    "df = get_dataset()\n",
    "X = df[df.dt < '2019-01-01']\n",
    "X2 = df[df.dt >= '2019-01-01']\n",
    "\n",
    "N_NUM_FEATURES = len(FNAMES)\n",
    "# N_CAT_FEATURES = len(CAT_FNAMES)\n",
    "\n",
    "X_train, Y_train = gen_input(X)\n",
    "X_test, Y_test = gen_input(X2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{0.0: 0.5704855209884968, 1.0: 4.046827724247079}"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "neg,pos = np.bincount(Y_train.astype(np.int64))\n",
    "total = pos + neg\n",
    "weight_for_0 = (1 / neg) * (total / 2.0)\n",
    "weight_for_1 = (1 / pos) * (total / 2.0)\n",
    "\n",
    "class_weight = {0.0: weight_for_0, 1.0: weight_for_1}\n",
    "class_weight"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 137,
   "id": "30a20720-174a-4868-b669-bb4bcfb25da5",
   "metadata": {},
   "outputs": [],
   "source": [
    "# model_dir = \"model\"\n",
    "# if ARGS.job == 'train':\n",
    "#     callbacks = []\n",
    "#     log_dir = \"train_logs/\"\n",
    "#     tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)\n",
    "#     callbacks.append(tensorboard_callback)\n",
    "#     model = model_fun()\n",
    "#     model.fit(X_train, Y_train, epochs = 10, callbacks=callbacks)\n",
    "#     model.save(model_dir)\n",
    "#     model.evaluate(X_test, Y_test)\n",
    "# elif ARGS.job == 'eval':\n",
    "#     model = tf.keras.models.load_model(model_dir)\n",
    "#     model.evaluate(X_test, Y_test)\n",
    "# elif ARGS.job == 'predict':\n",
    "#     model = tf.keras.models.load_model(model_dir)\n",
    "#     Y_res = model.predict(X_test)\n",
    "#     X2[\"target\"] = Y_test\n",
    "#     X2[\"Y\"] = Y_res\n",
    "#     X2[\"FLAG\"] = X2.apply(flag_fun, axis=1)\n",
    "#     for i in range(4):\n",
    "#         X2[X2.FLAG == i].to_csv(\"/tmp/p_%d_csv\" % i, index = False)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "id": "52496114-b9a7-40c0-8e79-e5dd78ab8f3c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/10\n",
      "5434/5434 [==============================] - 30s 5ms/step - loss: 0.4904 - accuracy: 0.6906 - auc_9: 0.8294\n",
      "Epoch 2/10\n",
      "5434/5434 [==============================] - 31s 6ms/step - loss: 0.4661 - accuracy: 0.7022 - auc_9: 0.8460\n",
      "Epoch 3/10\n",
      "5434/5434 [==============================] - 27s 5ms/step - loss: 0.4571 - accuracy: 0.7108 - auc_9: 0.8528\n",
      "Epoch 4/10\n",
      "5434/5434 [==============================] - 30s 6ms/step - loss: 0.4521 - accuracy: 0.7155 - auc_9: 0.8565\n",
      "Epoch 5/10\n",
      "5434/5434 [==============================] - 30s 6ms/step - loss: 0.4476 - accuracy: 0.7195 - auc_9: 0.8593\n",
      "Epoch 6/10\n",
      "5434/5434 [==============================] - 29s 5ms/step - loss: 0.4442 - accuracy: 0.7235 - auc_9: 0.8617\n",
      "Epoch 7/10\n",
      "5434/5434 [==============================] - 28s 5ms/step - loss: 0.4410 - accuracy: 0.7257 - auc_9: 0.8640\n",
      "Epoch 8/10\n",
      "5434/5434 [==============================] - 29s 5ms/step - loss: 0.4389 - accuracy: 0.7264 - auc_9: 0.8653\n",
      "Epoch 9/10\n",
      "5434/5434 [==============================] - 29s 5ms/step - loss: 0.4355 - accuracy: 0.7281 - auc_9: 0.8668\n",
      "Epoch 10/10\n",
      "5434/5434 [==============================] - 27s 5ms/step - loss: 0.4323 - accuracy: 0.7287 - auc_9: 0.8684\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<keras.callbacks.History at 0x7fb99c2889e8>"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "callbacks = []\n",
    "log_dir = \"train_logs/\"\n",
    "tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)\n",
    "callbacks.append(tensorboard_callback)\n",
    "model = model_fun()\n",
    "model.fit(X_train, Y_train, epochs = 10, callbacks=callbacks,class_weight = class_weight)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 164,
   "id": "13d9eaeb-f504-40b8-9960-12f710741bf1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1883/1883 [==============================] - 7s 4ms/step - loss: 0.9959 - accuracy: 0.7627 - auc_9: 0.8230\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "[0.9959245324134827, 0.7626848816871643, 0.8229600191116333]"
      ]
     },
     "execution_count": 164,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model_dir = \"model\"\n",
    "# model.save(model_dir)\n",
    "model.evaluate(X_test, Y_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    }
   ],
   "source": [
    "X2[\"score\"] = model.predict(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    }
   ],
   "source": [
    "X2[\"Y\"] = Y_test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>name</th>\n",
       "      <th>score</th>\n",
       "      <th>Y</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>2019-01-16</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>0.832423</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>315</th>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>0.869813</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>331</th>\n",
       "      <td>2019-10-21</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>0.904060</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>333</th>\n",
       "      <td>2019-11-27</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>0.861290</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>350</th>\n",
       "      <td>2020-04-28</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>0.821818</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>249</th>\n",
       "      <td>2019-10-30</td>\n",
       "      <td>金达威</td>\n",
       "      <td>0.847180</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>253</th>\n",
       "      <td>2019-11-21</td>\n",
       "      <td>金达威</td>\n",
       "      <td>0.874632</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>286</th>\n",
       "      <td>2020-09-08</td>\n",
       "      <td>金达威</td>\n",
       "      <td>0.880842</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>333</th>\n",
       "      <td>2021-07-22</td>\n",
       "      <td>金达威</td>\n",
       "      <td>0.834841</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>335</th>\n",
       "      <td>2021-07-26</td>\n",
       "      <td>金达威</td>\n",
       "      <td>0.867410</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3333 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           date name     score    Y\n",
       "298  2019-01-16  欧菲光  0.832423  1.0\n",
       "315  2019-06-04  欧菲光  0.869813  0.0\n",
       "331  2019-10-21  欧菲光  0.904060  1.0\n",
       "333  2019-11-27  欧菲光  0.861290  1.0\n",
       "350  2020-04-28  欧菲光  0.821818  1.0\n",
       "..          ...  ...       ...  ...\n",
       "249  2019-10-30  金达威  0.847180  1.0\n",
       "253  2019-11-21  金达威  0.874632  0.0\n",
       "286  2020-09-08  金达威  0.880842  0.0\n",
       "333  2021-07-22  金达威  0.834841  0.0\n",
       "335  2021-07-26  金达威  0.867410  0.0\n",
       "\n",
       "[3333 rows x 4 columns]"
      ]
     },
     "execution_count": 141,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X2[X2.score > 0.8][['date', \"name\", \"score\", \"Y\"]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 162,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.metrics import f1_score, auc, precision_score, roc_auc_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 157,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.3733070866141732"
      ]
     },
     "execution_count": 157,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "precision_score(X2.Y, (X2.score > 0.6).astype(\"int\"))\n",
    "# X2.Y.astype(\"int\").values.tolist()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "metadata": {},
   "outputs": [],
   "source": [
    "# X2.to_csv(\"X2.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 159,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<function roc_auc_score at 0x7fba14519620> 0.7493734335839599\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:3: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  This is separate from the ipykernel package so we can avoid doing imports until\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "(0.290288026660319, 0.22873068837155477)"
      ]
     },
     "execution_count": 182,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "scores(X2[(X2.code == \"300750.XSHE\")], [roc_auc_score])\n",
    "\n",
    "X2['pt'] = X2.score > 0.5\n",
    "tr = X2[X2.target == X2.pt]\n",
    "fr = X2[X2.target != X2.pt]\n",
    "\n",
    "\n",
    "p1,p2, n1, n2 = len(fr[fr.target == 1.0]), len(tr[tr.target == 1.0]),len(fr[fr.target == 0.0]), len(tr[tr.target == 0.0])\n",
    "p1/(p2 + p1), n1/(n2 + n1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 180,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>target</th>\n",
       "      <th>score</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>306</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.698438</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>307</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.527279</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>314</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.576437</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>315</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.869813</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>316</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0.395512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>332</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.658842</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>333</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.834841</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>334</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.745908</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>335</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.867410</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>337</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.573786</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>14298 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     target     score\n",
       "306     0.0  0.698438\n",
       "307     0.0  0.527279\n",
       "314     0.0  0.576437\n",
       "315     0.0  0.869813\n",
       "316     1.0  0.395512\n",
       "..      ...       ...\n",
       "332     0.0  0.658842\n",
       "333     0.0  0.834841\n",
       "334     0.0  0.745908\n",
       "335     0.0  0.867410\n",
       "337     0.0  0.573786\n",
       "\n",
       "[14298 rows x 2 columns]"
      ]
     },
     "execution_count": 180,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fr[['target', 'score']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 197,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "f1_score 0.4547742525930446\n",
      "precision_score 0.33458646616541354\n",
      "accuracy_score 0.7626848578399642\n",
      "recall_score 0.7097119733396811\n",
      "roc_auc_score 0.8218069008337374\n"
     ]
    }
   ],
   "source": [
    "\n",
    "def scores(df, metrics_funs = []):\n",
    "    for mf in metrics_funs:\n",
    "        if mf == roc_auc_score:\n",
    "            print(mf.__name__, mf(df.target, df.score))\n",
    "        else:\n",
    "            print(mf.__name__, mf(df.target, (df.score > 0.5).astype('int')))\n",
    "# auc.__name__\n",
    "        \n",
    "scores(X2, [f1_score,precision_score,accuracy_score,recall_score, roc_auc_score])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 194,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.33458646616541354"
      ]
     },
     "execution_count": 194,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "precision_score(X2.target, (X2.score > 0.5).astype(\"int\"))\n",
    "# X2.Y.astype(\"int\").values.tolist()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 200,
   "metadata": {},
   "outputs": [],
   "source": [
    "fr = X2[X2.target != X2.pt]\n",
    "fr[fr.target == 1.0].to_csv('bad_case.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 201,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((173876, 20), (173876,))"
      ]
     },
     "execution_count": 201,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train.shape, Y_train.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 202,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 0.64583058,  0.47073526,  0.43733806, ...,  0.03310589,\n",
       "         1.96650459, -0.37142857],\n",
       "       [ 0.44509527,  0.40887555,  0.41401684, ...,  0.02785678,\n",
       "         0.56120527, -0.57142857],\n",
       "       [ 0.36689768,  0.37791716,  0.40125823, ...,  0.0401995 ,\n",
       "        -0.42126789, -0.68571429],\n",
       "       ...,\n",
       "       [ 0.2193204 ,  0.37294014,  0.44187287, ...,  0.45170787,\n",
       "        -1.98719795, -0.93121693],\n",
       "       [ 0.19006127,  0.34805788,  0.42778606, ...,  0.44341403,\n",
       "        -1.68229907, -0.96984925],\n",
       "       [ 0.20503374,  0.35359299,  0.43001677, ...,  0.30746707,\n",
       "        -1.37435897, -0.955     ]])"
      ]
     },
     "execution_count": 202,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.linear_model import LogisticRegression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [],
   "source": [
    "lr = LogisticRegression(class_weight = class_weight)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/lib/python3.6/dist-packages/sklearn/linear_model/_logistic.py:765: ConvergenceWarning: lbfgs failed to converge (status=1):\n",
      "STOP: TOTAL NO. of ITERATIONS REACHED LIMIT.\n",
      "\n",
      "Increase the number of iterations (max_iter) or scale the data as shown in:\n",
      "    https://scikit-learn.org/stable/modules/preprocessing.html\n",
      "Please also refer to the documentation for alternative solver options:\n",
      "    https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression\n",
      "  extra_warning_msg=_LOGISTIC_SOLVER_CONVERGENCE_MSG)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "LogisticRegression(class_weight={0.0: 0.5704855209884968,\n",
       "                                 1.0: 4.046827724247079})"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lr.fit(X_train, Y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [],
   "source": [
    "w,b = lr.coef_.tolist()[0], lr.intercept_[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAp4AAAI/CAYAAADeNtnYAAAAOXRFWH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SZIktcLgKUmSpFYYPCVJktQKg6ckSZJaYfCUJElSKwyekiRJasX/A7xuDf8vqDAgAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 720x720 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# dict(zip(FNAMES, w))\n",
    "\n",
    "pd.Series(w, index = FNAMES).plot(kind = 'barh', figsize = (10, 10)).invert_yaxis()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 215,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>rsi_6</th>\n",
       "      <th>rsi_12</th>\n",
       "      <th>rsi_24</th>\n",
       "      <th>stoch_k</th>\n",
       "      <th>stoch_d</th>\n",
       "      <th>stoch_j</th>\n",
       "      <th>bbp</th>\n",
       "      <th>b_up_low</th>\n",
       "      <th>macd</th>\n",
       "      <th>macdsignal</th>\n",
       "      <th>macdhist</th>\n",
       "      <th>SMA_DIFF_5</th>\n",
       "      <th>SMA_DIFF_13</th>\n",
       "      <th>VOL_SMA_DIFF_5</th>\n",
       "      <th>VOL_SMA_DIFF_13</th>\n",
       "      <th>BETA</th>\n",
       "      <th>CORREL</th>\n",
       "      <th>STDDEV</th>\n",
       "      <th>CCI</th>\n",
       "      <th>WILLR</th>\n",
       "      <th>target</th>\n",
       "      <th>dt</th>\n",
       "      <th>score</th>\n",
       "      <th>Y</th>\n",
       "      <th>pt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>2019-01-16</td>\n",
       "      <td>002456.XSHE</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>0.306703</td>\n",
       "      <td>0.317197</td>\n",
       "      <td>0.336199</td>\n",
       "      <td>0.610703</td>\n",
       "      <td>0.715638</td>\n",
       "      <td>0.400835</td>\n",
       "      <td>0.134550</td>\n",
       "      <td>1.185580</td>\n",
       "      <td>-0.480667</td>\n",
       "      <td>-0.551809</td>\n",
       "      <td>0.071143</td>\n",
       "      <td>-0.038078</td>\n",
       "      <td>-0.037324</td>\n",
       "      <td>0.907145</td>\n",
       "      <td>0.937062</td>\n",
       "      <td>-1.563439</td>\n",
       "      <td>0.981206</td>\n",
       "      <td>0.189694</td>\n",
       "      <td>-1.619196</td>\n",
       "      <td>-0.660550</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2019-01-16</td>\n",
       "      <td>0.832423</td>\n",
       "      <td>1.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>299</th>\n",
       "      <td>2019-03-12</td>\n",
       "      <td>002456.XSHE</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>0.758597</td>\n",
       "      <td>0.750283</td>\n",
       "      <td>0.711619</td>\n",
       "      <td>0.661248</td>\n",
       "      <td>0.596501</td>\n",
       "      <td>0.790743</td>\n",
       "      <td>0.953428</td>\n",
       "      <td>1.392152</td>\n",
       "      <td>1.119018</td>\n",
       "      <td>1.082398</td>\n",
       "      <td>0.036620</td>\n",
       "      <td>0.064677</td>\n",
       "      <td>0.091756</td>\n",
       "      <td>0.330506</td>\n",
       "      <td>0.413954</td>\n",
       "      <td>0.952737</td>\n",
       "      <td>0.994647</td>\n",
       "      <td>0.541310</td>\n",
       "      <td>1.633935</td>\n",
       "      <td>-0.063091</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2019-03-12</td>\n",
       "      <td>0.010702</td>\n",
       "      <td>0.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>300</th>\n",
       "      <td>2019-03-13</td>\n",
       "      <td>002456.XSHE</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>0.531641</td>\n",
       "      <td>0.606492</td>\n",
       "      <td>0.625907</td>\n",
       "      <td>0.707623</td>\n",
       "      <td>0.646532</td>\n",
       "      <td>0.829805</td>\n",
       "      <td>0.687619</td>\n",
       "      <td>1.356496</td>\n",
       "      <td>1.061777</td>\n",
       "      <td>1.078274</td>\n",
       "      <td>-0.016497</td>\n",
       "      <td>-0.009995</td>\n",
       "      <td>0.012108</td>\n",
       "      <td>-0.065883</td>\n",
       "      <td>0.005263</td>\n",
       "      <td>0.924261</td>\n",
       "      <td>0.994267</td>\n",
       "      <td>0.542343</td>\n",
       "      <td>0.785632</td>\n",
       "      <td>-0.462898</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2019-03-13</td>\n",
       "      <td>0.009931</td>\n",
       "      <td>0.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>301</th>\n",
       "      <td>2019-03-15</td>\n",
       "      <td>002456.XSHE</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>0.490660</td>\n",
       "      <td>0.570937</td>\n",
       "      <td>0.601874</td>\n",
       "      <td>0.312776</td>\n",
       "      <td>0.517362</td>\n",
       "      <td>-0.096394</td>\n",
       "      <td>0.575540</td>\n",
       "      <td>1.243295</td>\n",
       "      <td>0.895882</td>\n",
       "      <td>1.024045</td>\n",
       "      <td>-0.128163</td>\n",
       "      <td>-0.026837</td>\n",
       "      <td>-0.005911</td>\n",
       "      <td>-0.348280</td>\n",
       "      <td>-0.363301</td>\n",
       "      <td>0.722484</td>\n",
       "      <td>0.993081</td>\n",
       "      <td>0.550730</td>\n",
       "      <td>-0.027954</td>\n",
       "      <td>-0.631373</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2019-03-15</td>\n",
       "      <td>0.443643</td>\n",
       "      <td>0.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>302</th>\n",
       "      <td>2019-04-09</td>\n",
       "      <td>002456.XSHE</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>0.499732</td>\n",
       "      <td>0.539453</td>\n",
       "      <td>0.566263</td>\n",
       "      <td>0.622744</td>\n",
       "      <td>0.756875</td>\n",
       "      <td>0.354481</td>\n",
       "      <td>0.590447</td>\n",
       "      <td>1.185512</td>\n",
       "      <td>0.434829</td>\n",
       "      <td>0.460360</td>\n",
       "      <td>-0.025531</td>\n",
       "      <td>-0.023806</td>\n",
       "      <td>0.010430</td>\n",
       "      <td>-0.336173</td>\n",
       "      <td>-0.286233</td>\n",
       "      <td>0.259931</td>\n",
       "      <td>0.909039</td>\n",
       "      <td>0.417248</td>\n",
       "      <td>0.288577</td>\n",
       "      <td>-0.475655</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2019-04-09</td>\n",
       "      <td>0.485712</td>\n",
       "      <td>0.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           date         code name     rsi_6    rsi_12    rsi_24   stoch_k  \\\n",
       "298  2019-01-16  002456.XSHE  欧菲光  0.306703  0.317197  0.336199  0.610703   \n",
       "299  2019-03-12  002456.XSHE  欧菲光  0.758597  0.750283  0.711619  0.661248   \n",
       "300  2019-03-13  002456.XSHE  欧菲光  0.531641  0.606492  0.625907  0.707623   \n",
       "301  2019-03-15  002456.XSHE  欧菲光  0.490660  0.570937  0.601874  0.312776   \n",
       "302  2019-04-09  002456.XSHE  欧菲光  0.499732  0.539453  0.566263  0.622744   \n",
       "\n",
       "      stoch_d   stoch_j       bbp  b_up_low      macd  macdsignal  macdhist  \\\n",
       "298  0.715638  0.400835  0.134550  1.185580 -0.480667   -0.551809  0.071143   \n",
       "299  0.596501  0.790743  0.953428  1.392152  1.119018    1.082398  0.036620   \n",
       "300  0.646532  0.829805  0.687619  1.356496  1.061777    1.078274 -0.016497   \n",
       "301  0.517362 -0.096394  0.575540  1.243295  0.895882    1.024045 -0.128163   \n",
       "302  0.756875  0.354481  0.590447  1.185512  0.434829    0.460360 -0.025531   \n",
       "\n",
       "     SMA_DIFF_5  SMA_DIFF_13  VOL_SMA_DIFF_5  VOL_SMA_DIFF_13      BETA  \\\n",
       "298   -0.038078    -0.037324        0.907145         0.937062 -1.563439   \n",
       "299    0.064677     0.091756        0.330506         0.413954  0.952737   \n",
       "300   -0.009995     0.012108       -0.065883         0.005263  0.924261   \n",
       "301   -0.026837    -0.005911       -0.348280        -0.363301  0.722484   \n",
       "302   -0.023806     0.010430       -0.336173        -0.286233  0.259931   \n",
       "\n",
       "       CORREL    STDDEV       CCI     WILLR  target         dt     score    Y  \\\n",
       "298  0.981206  0.189694 -1.619196 -0.660550     1.0 2019-01-16  0.832423  1.0   \n",
       "299  0.994647  0.541310  1.633935 -0.063091     0.0 2019-03-12  0.010702  0.0   \n",
       "300  0.994267  0.542343  0.785632 -0.462898     0.0 2019-03-13  0.009931  0.0   \n",
       "301  0.993081  0.550730 -0.027954 -0.631373     0.0 2019-03-15  0.443643  0.0   \n",
       "302  0.909039  0.417248  0.288577 -0.475655     0.0 2019-04-09  0.485712  0.0   \n",
       "\n",
       "        pt  \n",
       "298   True  \n",
       "299  False  \n",
       "300  False  \n",
       "301  False  \n",
       "302  False  "
      ]
     },
     "execution_count": 215,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X2.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 229,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:2: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  \n"
     ]
    }
   ],
   "source": [
    "Y_lr = lr.predict(X_test)\n",
    "X2['Y_lr'] = Y_lr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 230,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "precision:  0.3113559322033898  f1: 0.42226649298904295  accuracy: 0.7497053893010672  recall: 0.65591525827184  auc: 0.7104098443074824\n"
     ]
    }
   ],
   "source": [
    "ps = precision_score(X2.target, X2.Y_lr)\n",
    "fs = f1_score(X2.target, X2.Y_lr)\n",
    "acs = accuracy_score(X2.target, X2.Y_lr)\n",
    "rs = recall_score(X2.target, X2.Y_lr)\n",
    "auc = roc_auc_score(X2.target, X2.Y_lr)\n",
    "print('precision: ',ps, ' f1:', fs, ' accuracy:',  acs, \" recall:\", rs, \" auc:\", auc)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 232,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>rsi_6</th>\n",
       "      <th>rsi_12</th>\n",
       "      <th>rsi_24</th>\n",
       "      <th>stoch_k</th>\n",
       "      <th>stoch_d</th>\n",
       "      <th>stoch_j</th>\n",
       "      <th>bbp</th>\n",
       "      <th>b_up_low</th>\n",
       "      <th>macd</th>\n",
       "      <th>macdsignal</th>\n",
       "      <th>macdhist</th>\n",
       "      <th>SMA_DIFF_5</th>\n",
       "      <th>SMA_DIFF_13</th>\n",
       "      <th>VOL_SMA_DIFF_5</th>\n",
       "      <th>VOL_SMA_DIFF_13</th>\n",
       "      <th>BETA</th>\n",
       "      <th>CORREL</th>\n",
       "      <th>STDDEV</th>\n",
       "      <th>CCI</th>\n",
       "      <th>WILLR</th>\n",
       "      <th>target</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>1.738760e+05</td>\n",
       "      <td>1.738760e+05</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "      <td>173876.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>0.465064</td>\n",
       "      <td>0.484257</td>\n",
       "      <td>0.495295</td>\n",
       "      <td>4.663568e-01</td>\n",
       "      <td>4.823954e-01</td>\n",
       "      <td>0.434280</td>\n",
       "      <td>0.449379</td>\n",
       "      <td>1.221773</td>\n",
       "      <td>0.020373</td>\n",
       "      <td>0.033773</td>\n",
       "      <td>-0.013399</td>\n",
       "      <td>-0.008421</td>\n",
       "      <td>-0.008573</td>\n",
       "      <td>0.049073</td>\n",
       "      <td>0.091799</td>\n",
       "      <td>0.598759</td>\n",
       "      <td>0.925315</td>\n",
       "      <td>0.293427</td>\n",
       "      <td>-0.146898</td>\n",
       "      <td>-0.567260</td>\n",
       "      <td>0.123554</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>0.186065</td>\n",
       "      <td>0.135986</td>\n",
       "      <td>0.100371</td>\n",
       "      <td>2.598497e-01</td>\n",
       "      <td>2.494113e-01</td>\n",
       "      <td>0.358990</td>\n",
       "      <td>0.342190</td>\n",
       "      <td>3.498543</td>\n",
       "      <td>0.659541</td>\n",
       "      <td>0.622240</td>\n",
       "      <td>0.212179</td>\n",
       "      <td>0.037086</td>\n",
       "      <td>0.067341</td>\n",
       "      <td>0.488065</td>\n",
       "      <td>0.885326</td>\n",
       "      <td>0.858111</td>\n",
       "      <td>0.080918</td>\n",
       "      <td>0.478485</td>\n",
       "      <td>1.143753</td>\n",
       "      <td>0.285649</td>\n",
       "      <td>0.329072</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-3.505344e-15</td>\n",
       "      <td>-4.981694e-15</td>\n",
       "      <td>-0.666667</td>\n",
       "      <td>-0.589725</td>\n",
       "      <td>-1440.456616</td>\n",
       "      <td>-28.285081</td>\n",
       "      <td>-20.102698</td>\n",
       "      <td>-11.321236</td>\n",
       "      <td>-0.318508</td>\n",
       "      <td>-0.470331</td>\n",
       "      <td>-1.000000</td>\n",
       "      <td>-1.000000</td>\n",
       "      <td>-61.036817</td>\n",
       "      <td>-1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-4.666667</td>\n",
       "      <td>-1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>0.327394</td>\n",
       "      <td>0.390441</td>\n",
       "      <td>0.428354</td>\n",
       "      <td>2.305745e-01</td>\n",
       "      <td>2.598372e-01</td>\n",
       "      <td>0.130207</td>\n",
       "      <td>0.179296</td>\n",
       "      <td>1.114951</td>\n",
       "      <td>-0.143241</td>\n",
       "      <td>-0.125930</td>\n",
       "      <td>-0.049991</td>\n",
       "      <td>-0.025773</td>\n",
       "      <td>-0.040037</td>\n",
       "      <td>-0.232555</td>\n",
       "      <td>-0.297717</td>\n",
       "      <td>0.255467</td>\n",
       "      <td>0.905032</td>\n",
       "      <td>0.074189</td>\n",
       "      <td>-1.009615</td>\n",
       "      <td>-0.826087</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>0.454209</td>\n",
       "      <td>0.478871</td>\n",
       "      <td>0.490787</td>\n",
       "      <td>4.600998e-01</td>\n",
       "      <td>4.855835e-01</td>\n",
       "      <td>0.411958</td>\n",
       "      <td>0.424008</td>\n",
       "      <td>1.172900</td>\n",
       "      <td>0.001548</td>\n",
       "      <td>0.008017</td>\n",
       "      <td>-0.003375</td>\n",
       "      <td>-0.007220</td>\n",
       "      <td>-0.008366</td>\n",
       "      <td>-0.043674</td>\n",
       "      <td>-0.081435</td>\n",
       "      <td>0.577009</td>\n",
       "      <td>0.945054</td>\n",
       "      <td>0.156793</td>\n",
       "      <td>-0.216210</td>\n",
       "      <td>-0.589353</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>0.596713</td>\n",
       "      <td>0.574578</td>\n",
       "      <td>0.557943</td>\n",
       "      <td>6.984127e-01</td>\n",
       "      <td>7.046133e-01</td>\n",
       "      <td>0.735649</td>\n",
       "      <td>0.723933</td>\n",
       "      <td>1.271270</td>\n",
       "      <td>0.155179</td>\n",
       "      <td>0.157416</td>\n",
       "      <td>0.037359</td>\n",
       "      <td>0.010682</td>\n",
       "      <td>0.023622</td>\n",
       "      <td>0.209708</td>\n",
       "      <td>0.234508</td>\n",
       "      <td>0.909967</td>\n",
       "      <td>0.969598</td>\n",
       "      <td>0.333527</td>\n",
       "      <td>0.740535</td>\n",
       "      <td>-0.314917</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000e+00</td>\n",
       "      <td>1.000000e+00</td>\n",
       "      <td>1.602740</td>\n",
       "      <td>1.589725</td>\n",
       "      <td>87.985701</td>\n",
       "      <td>37.354689</td>\n",
       "      <td>33.854857</td>\n",
       "      <td>10.098759</td>\n",
       "      <td>2.697917</td>\n",
       "      <td>5.321918</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>12.000000</td>\n",
       "      <td>99.264963</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>28.078966</td>\n",
       "      <td>4.666667</td>\n",
       "      <td>-0.000000</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               rsi_6         rsi_12         rsi_24       stoch_k  \\\n",
       "count  173876.000000  173876.000000  173876.000000  1.738760e+05   \n",
       "mean        0.465064       0.484257       0.495295  4.663568e-01   \n",
       "std         0.186065       0.135986       0.100371  2.598497e-01   \n",
       "min         0.000000       0.000000       0.000000 -3.505344e-15   \n",
       "25%         0.327394       0.390441       0.428354  2.305745e-01   \n",
       "50%         0.454209       0.478871       0.490787  4.600998e-01   \n",
       "75%         0.596713       0.574578       0.557943  6.984127e-01   \n",
       "max         1.000000       1.000000       1.000000  1.000000e+00   \n",
       "\n",
       "            stoch_d        stoch_j            bbp       b_up_low  \\\n",
       "count  1.738760e+05  173876.000000  173876.000000  173876.000000   \n",
       "mean   4.823954e-01       0.434280       0.449379       1.221773   \n",
       "std    2.494113e-01       0.358990       0.342190       3.498543   \n",
       "min   -4.981694e-15      -0.666667      -0.589725   -1440.456616   \n",
       "25%    2.598372e-01       0.130207       0.179296       1.114951   \n",
       "50%    4.855835e-01       0.411958       0.424008       1.172900   \n",
       "75%    7.046133e-01       0.735649       0.723933       1.271270   \n",
       "max    1.000000e+00       1.602740       1.589725      87.985701   \n",
       "\n",
       "                macd     macdsignal       macdhist     SMA_DIFF_5  \\\n",
       "count  173876.000000  173876.000000  173876.000000  173876.000000   \n",
       "mean        0.020373       0.033773      -0.013399      -0.008421   \n",
       "std         0.659541       0.622240       0.212179       0.037086   \n",
       "min       -28.285081     -20.102698     -11.321236      -0.318508   \n",
       "25%        -0.143241      -0.125930      -0.049991      -0.025773   \n",
       "50%         0.001548       0.008017      -0.003375      -0.007220   \n",
       "75%         0.155179       0.157416       0.037359       0.010682   \n",
       "max        37.354689      33.854857      10.098759       2.697917   \n",
       "\n",
       "         SMA_DIFF_13  VOL_SMA_DIFF_5  VOL_SMA_DIFF_13           BETA  \\\n",
       "count  173876.000000   173876.000000    173876.000000  173876.000000   \n",
       "mean       -0.008573        0.049073         0.091799       0.598759   \n",
       "std         0.067341        0.488065         0.885326       0.858111   \n",
       "min        -0.470331       -1.000000        -1.000000     -61.036817   \n",
       "25%        -0.040037       -0.232555        -0.297717       0.255467   \n",
       "50%        -0.008366       -0.043674        -0.081435       0.577009   \n",
       "75%         0.023622        0.209708         0.234508       0.909967   \n",
       "max         5.321918        4.000000        12.000000      99.264963   \n",
       "\n",
       "              CORREL         STDDEV            CCI          WILLR  \\\n",
       "count  173876.000000  173876.000000  173876.000000  173876.000000   \n",
       "mean        0.925315       0.293427      -0.146898      -0.567260   \n",
       "std         0.080918       0.478485       1.143753       0.285649   \n",
       "min        -1.000000       0.000000      -4.666667      -1.000000   \n",
       "25%         0.905032       0.074189      -1.009615      -0.826087   \n",
       "50%         0.945054       0.156793      -0.216210      -0.589353   \n",
       "75%         0.969598       0.333527       0.740535      -0.314917   \n",
       "max         1.000000      28.078966       4.666667      -0.000000   \n",
       "\n",
       "              target  \n",
       "count  173876.000000  \n",
       "mean        0.123554  \n",
       "std         0.329072  \n",
       "min         0.000000  \n",
       "25%         0.000000  \n",
       "50%         0.000000  \n",
       "75%         0.000000  \n",
       "max         1.000000  "
      ]
     },
     "execution_count": 232,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import seaborn as sns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<function seaborn.categorical.countplot(*, x=None, y=None, hue=None, data=None, order=None, hue_order=None, orient=None, color=None, palette=None, saturation=0.75, dodge=True, ax=None, **kwargs)>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sns.countplot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def categorical_summarized(df, x = None, y = None, hue = None, palette = 'Set1', verbose = True):\n",
    "    if x is None:\n",
    "        column_interested = y\n",
    "    else:\n",
    "        column_interested = x\n",
    "    series = df[column_interested]\n",
    "    sns.countplot(x=x, y=y, hue=hue, data=df, palette = palette)\n",
    "#     plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAEGCAYAAABCa2PoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAQBUlEQVR4nO3df4xlZX3H8fcHRqAg8mvVrizNIvUXpLbiqlBaA0jrSlXaRiOExp+tVayt2migWG01TQM2KSU1IrYKUlAQaSEUIS1QbWyFziIgoAtbftRFWgQUUVpl5ekf51n27jizc2f2OXPnwPuV3Oy5zzlzz3e/d+585pznzrkppSBJ0vbaYdIFSJIeHwwUSVITBookqQkDRZLUhIEiSWpiatIFLNSKFSvK6tWrJ12GJA3KunXr7iulPLXPfQwuUFavXs309PSky5CkQUlyV9/78JSXJKkJA0WS1ISBIklqwk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t453LqJT95Pr33/s21jwXUuBa4BXjqjO0W3KeFPhcLqXPGujvZMocysV7O0c+3AR+qy8+mOzWVifdzsT+4JnGje6fFrXTvVjh5Cfb3S3SHozcC19fb0XTnEa8EbqN7p8Xmb6AAH631fQ1YM/JYbwY21NubRsbXADfVr/lr5pn0GqPmw9kSKM+s39Qb6jfN5neE7FLvb6jrnzny9SfXWtYz8g6pVr0HfgGYrj39h/oiXFb9BP4U+EZ9nHPqi3NZ9BL4DN3cziN0v6W+ZSn6N9c+FlDjBrofetfX2xmL7dNinotx65yx/k62BMpEermNfu4E/F19/OuAIyfdz1KKl16RJLUxpDkUSdIyZqBIkpowUCRJTRgokqQmDBRJUhMGijQBSd5V/zJbetzwbcPSBNS/xF5TSrlv0rVIrXiEIs0hyevrZ1/ckOScJKuTXFXHrkzyM3W7s5K8ZuTrvl//PTzJv2TL57+cWz9X4/fprhN2dZKrJ/O/k9qbmn8T6YknyUHA+4FfLKXcl2RvusuwnF1KOTvJm4HTgV+f56FeQHc5jG8BXwYOK6WcnuQ9wBEeoejxxCMUaXZHAp/b/AO/lPIA3WdFnFfXn0N3aZ75XFtK2VhKeZTukiOr25cqLQ8GirT9NlFfS0l2oLvO0mY/HFn+MZ4V0OOYgSLN7irgtUn2ge5zwIF/o7vqKsDxdFdOhu4igi+sy68GnjTG4z9E97HS0uOGvy1Jsyil3Jzkz4AvJvkx8FW6y9h/Ksl76T558k11808AFye5Abic7oPD5nMmcHmSb5VSjmj/P5CWnm8bliQ14SkvSVITBookqQkDRZLUhIEiSWrCQJEkNWGgSJKaMFAkSU38PzOIdPvnfNv/AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "categorical_summarized(X, y = 'target')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:xlabel='target', ylabel='SMA_DIFF_5'>"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEGCAYAAACHGfl5AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAWHklEQVR4nO3df5BdZZ3n8fe30wRKzcDcSYMQfgSQ3a1RB8VeBVQqnalGQEd0cUbmjoqsu1nGdXemdjZirCln1tpZZsyUM+NPNjNGRefKuGJpxkoKukyPyBS4dLJIbNCdLJoiGCsNdwz4A7Dp7/5xb8NNp7tzk/S5pzvn/aq6lXvOee6936Ru59PPeZ7znMhMJEnV1ld2AZKk8hkGkiTDQJJkGEiSMAwkSUB/2QUcjZUrV+bq1avLLkOSlpQdO3Y8mpkDsx1bkmGwevVqxsbGyi5DkpaUiNgz1zFPE0mSDANJkmEgScIwkCRhGFRes9lk/fr1NJvNskuRVCLDoOIajQbj4+M0Go2yS5FUIsOgwprNJiMjI2QmIyMj9g6kCjMMKqzRaDA1NQXA1NSUvQOpwgyDChsdHWVychKAyclJRkdHS65IUlkMgwobGhqiv791EXp/fz9DQ0MlVySpLIZBhdXrdfr6Wl+Bvr4+6vV6yRVJKothUGG1Wo3h4WEiguHhYWq1WtklSSrJklyoTgunXq+zZ88eewVSxRkGFVer1di4cWPZZUgqmaeJJEmGgSTJMJAkYRhIkig4DCLirIgYjYgHImI8In5vljZrIuJARNzXfnygyJokSYcqejbRJPAHmbkzIlYAOyJiJDMfmNHum5n5hoJrkSTNodCeQWbuy8yd7edPAA8Cq4r8TEnSkevZmEFErAZeDnxrlsOXRMS3I2JbRLx4jtevi4ixiBibmJgoslRJqpyehEFEvAC4Dfj9zHx8xuGdwDmZeSHwUeArs71HZm7KzMHMHBwYGCi0XkmqmsLDICJOoBUEf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+9tMuXt8H/DgzX1ZMedKxcwBZmt0TwIr285OB/e0gGALOmeM1/wj8RkSc1O4NvAEgMx8Hvh8RvwnPDjZfOMvnSKUxDKRZZOZjwD+2b9L+MmAwInbRGiD+7hyvuZfWcsv3A9uAXbQGhqHVu3hXRHwbGOe5W47eCqyPiP/THmSWSuFsImkBRcQLMvMnEfE84E5gXWbuLLsu6XAcM5AW1qb2RWQnAZ81CLRU2DOQJDlmIEkyDCRJGAaSJAwDSRKGgSQJ+P/uPMGznoqaPgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.boxplot(data=X, x = 'target', y = 'SMA_DIFF_5', palette = 'Set1')\n",
    "# sns.swarmplot(data = X, x = 'target', y = 'SMA_DIFF_5', palette = 'Set1')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.ensemble import RandomForestClassifier"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "rf_clf = RandomForestClassifier(n_estimators = 500, max_depth = 12, class_weight = class_weight, verbose = 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=1)]: Using backend SequentialBackend with 1 concurrent workers.\n",
      "[Parallel(n_jobs=1)]: Done 500 out of 500 | elapsed:  5.0min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "RandomForestClassifier(class_weight={0.0: 0.5704855209884968,\n",
       "                                     1.0: 4.046827724247079},\n",
       "                       max_depth=12, n_estimators=500, verbose=1)"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rf_clf.fit(X_train, Y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=1)]: Using backend SequentialBackend with 1 concurrent workers.\n",
      "[Parallel(n_jobs=1)]: Done 500 out of 500 | elapsed:    3.6s finished\n",
      "/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    }
   ],
   "source": [
    "X2['rf'] = rf_clf.predict(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "precision:  0.32283340344972655  f1: 0.447808009336932  accuracy: 0.7487095221497452  recall: 0.7306593668174244  auc: 0.7411469920283045\n"
     ]
    }
   ],
   "source": [
    "ps = precision_score(X2.target, X2.rf)\n",
    "fs = f1_score(X2.target, X2.rf)\n",
    "acs = accuracy_score(X2.target, X2.rf)\n",
    "rs = recall_score(X2.target, X2.rf)\n",
    "auc = roc_auc_score(X2.target, X2.rf)\n",
    "print('precision: ',ps, ' f1:', fs, ' accuracy:',  acs, \" recall:\", rs, \" auc:\", auc)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'rsi_6': 0.054484514522786055,\n",
       " 'rsi_12': 0.018822188955782835,\n",
       " 'rsi_24': 0.017785783932189166,\n",
       " 'stoch_k': 0.04390225909783629,\n",
       " 'stoch_d': 0.03373718793581827,\n",
       " 'stoch_j': 0.17184570782050224,\n",
       " 'bbp': 0.047693783120301536,\n",
       " 'b_up_low': 0.028659987002453455,\n",
       " 'macd': 0.016567314670584535,\n",
       " 'macdsignal': 0.019765623986219033,\n",
       " 'macdhist': 0.02114279725166841,\n",
       " 'SMA_DIFF_5': 0.10311271042962891,\n",
       " 'SMA_DIFF_13': 0.053252579187518224,\n",
       " 'VOL_SMA_DIFF_5': 0.025642513233401547,\n",
       " 'VOL_SMA_DIFF_13': 0.018877727827568053,\n",
       " 'BETA': 0.019951067198348525,\n",
       " 'CORREL': 0.018088674680615036,\n",
       " 'STDDEV': 0.013687249315013396,\n",
       " 'CCI': 0.19795962338547907,\n",
       " 'WILLR': 0.07502070644628539}"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dict(zip(FNAMES,rf_clf.feature_importances_))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAp4AAAI/CAYAAADeNtnYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAA8ZklEQVR4nO3de5zdVX3v/9fbIJcUCSjUBryM0ghVohFGLSi3ij+pwSpeKtgewbYnVms52J+XeLzxs+0xiKel1apFj+KFCh4U9Zi2aDEpiKJOIDCABBCiNbQHEY1SMEL4/P7Y38h2mMncv3vPzOv5eOzH7Flrfdda3+9j7+HNWvubnapCkiRJmm0P6fUEJEmStDAYPCVJktQKg6ckSZJaYfCUJElSKwyekiRJaoXBU5IkSa3YpdcT0MTsu+++NTAw0OtpSJIkjWvDhg13VNV+I8sNnnPEwMAAQ0NDvZ6GJEnSuJJ8d7Ryt9olSZLUCoOnJEmSWmHwlCRJUisMnpIkSWqFwVOSJEmt8K72OWJ4y1YGVq/t9TQ0x21es7LXU5AkLWCueEqSJKkVBk9JkiS1wuApSZKkVhg8Z0GSdyY5bif1SfKXSW5M8u0kp7U5P0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dgGWAD/cybET6bMfTedakORRwEXAK6rqFysXVbWl+flT4B/obD30uylfi+ajFz8EqKoNdFZxntC0f1TX8QviddF40MrFHH1dwPTe3zv7mzFfXxtjav6HbC3wlqq6Ykd5Vf17dWwDPsrceG1M61p0vR9uofP556fSeQ/t3bynJt1nD83EfwN/F7ioqu7dUTCfXxdJjgPeAvxO125hK38vDJ7t+xawrLlzcFc6/4H8wog2XwB23E32EuArzecqvgCclM4dvY8DltH5wO9E+uxHU74WSfam8x+Q1VV1+Y7GSXZJsm/z/KHACcC19L/pXIv9kiwCSPJ4Oq+LW6rq34GfJPnNZlv5FcDn2ziZaZrOe4QkD6HzH5FffL5zDr8uYHrv74uB/yfJPkn2Af4f4OJ5/toYVdP+IuDjVXXhiLqlzc/Q+ezaXHhtTOda7LNj27h5XzwTuL55D62j856CzntsXr8uupzMiP9Zna+viyRPBf6eTui8vauqnb8XU70ryce07jp7HnAjnZWptzRl72xeBAC7A/+bzs1D3wQe33XsW5rjNtF1V9lofc6Fx1SvBfBW4D+BjV2PXwV+BdgAXEPnpqO/ARb1+jxn+Vq8uDnXjcCVwPO7+hyk88fyO8D7aL40ot8f03yPHANcMaK/Ofu6mOD1eBqdz139J51Vq+u6jv2D5jrdTGd7eb6/Nka9FsDvA/eO+Juxoqn7CjDcXI9PAnv2+jxn+Voc0Zzv1c3PP+zq8/HNe+rm5j22W6/PczavRVM3QGcF7yEj+pyvr4t/Af5v1/vgC13HzvrfC7+5SJIkSa1wq12SJEmtMHhKkiSpFQZPSZIktcLgKUmSpFYYPCVJktQKg6ckSZJaYfCUJElSKwyekiRJasX/DyeAS0NC1/kiAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 720x720 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "pd.Series(rf_clf.feature_importances_, index = FNAMES).plot(kind = 'barh', figsize = (10, 10)).invert_yaxis()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
